Is there any way to split string into array by spaces in another string in Python